package com.train.daily.api;

import com.train.common.constants.ApiConstants;
import com.train.common.resp.CommonResp;
import com.train.daily.api.fallback.DailyTrainCarriageApiFallback;
import com.train.daily.dto.carriage.DailyTrainCarriageQueryListDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(
        contextId = "dailyTrainCarriageApi",
        name = ApiConstants.DAILY_TRAIN_NAME,
        path = ApiConstants.DAILY_TRAIN_PREFIX,
        fallback = DailyTrainCarriageApiFallback.class)
public interface DailyTrainCarriageApi {

    String PREFIX = "/carriage";

    @PostMapping(PREFIX + "/list")
    CommonResp queryTrainCarriageList(@RequestBody DailyTrainCarriageQueryListDTO dto);
}
